home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / close.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-30  |  1.4 KB  |  46 lines

  1. /*
  2.     GWAda Development Environment for 386/486 PCs   
  3.     Copyright (C) 1993, Arthur Vargas Lopes  & Michael Bliss Feldman
  4.                         vlopes@vortex.ufrgs.br mfeldman@seas.gwu.edu
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; version 2 of the License.    
  9.  
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20.  
  21. /* close.c */
  22.  
  23. #include "externs.h"
  24.  
  25.  
  26.  
  27.  
  28. void AVL_CLOSE()
  29. {
  30.     int i;
  31.     char msg[81];
  32.     if (avl_nwindows == 1)  
  33.         AVL_EXIT();
  34.     if (avl_windows[avl_window].changed)  {
  35.         sprintf(msg," Save %s (Y/N) ? ",avl_windows[avl_window].file_name);
  36.         if (AVL_QUESTION(msg) == 'Y')
  37.             AVL_SAVE();
  38.         }
  39.     AVL_FREE_ALL();
  40.     for(i = avl_window; i < (avl_nwindows - 1); ++i)
  41.         avl_windows[i] = avl_windows[i + 1];
  42.     --avl_nwindows;
  43.     if (avl_window != 0) --avl_window;
  44.     AVL_RESTORE_ENV();
  45. }
  46.                 
  47.